package avicit.bdp.dcs.semistructure.utils.iotdb;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * 时间格式转换
 */
public class TimeFormatUtils {
    /**
     * 毫秒值转为2016-09-03T00:00:00.000+08:00格式
     * @param milliSeconds
     * @return
     */
    public static String dataFormat(String milliSeconds) {
        DateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSXXX");
        Date date = new Date();
        date.setTime(Long.valueOf(milliSeconds));
        String format = df.format(date);
        return format;
    }

}
